Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bind bugs - supporting onclick attribute, retaining class attribute, walk bug - processDirective correctly removing attributes with 'modifiers', block bug - only remove template element if isConnected #186

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

terryaney
Copy link

@terryaney terryaney commented Nov 1, 2022

The raw variable was modified to remove any modifiers, then later used to attempt to remove the attribute; el.removeAttribute(raw). But if a modifier was present - @click.prevent, the removeAttribute attempts to find @click instead of @click.prevent.

Additionally, made bind.ts support force the :onclick binding as an attribute. When not an attribute and just assigned to the element property, it did not work. There were times when I couldn't use the @click directive and was forced to use :onclick (to support a legacy framework rendering elements by 'cloning them' and then losing the petite-vue event binding).

@terryaney terryaney changed the title processDirective correctly removing attribute names with 'modifiers' processDirective correctly removing attribute names with 'modifiers', bind.ts supporting onclick attribute binding Dec 12, 2022
@waldyrious
Copy link
Contributor

Note that the changes to src/block.ts in this PR are indented with tabs, whereas the rest of the file is indented with spaces.

@terryaney
Copy link
Author

Note that the changes to src/block.ts in this PR are indented with tabs, whereas the rest of the file is indented with spaces.

Shoot. Let me see if I can fix this, but this latest 'hack/fix' to block.ts, I didn't really want in my PR. I'll try to get it out of it and fix the spaces. Sorry about that. Is there not a .editorconfig for the project?

@terryaney
Copy link
Author

@waldyrious Although, that said, is anyone really taking PRs? I kind of put it out there just for documentation for me, lol. Seems petite-vue has been abandoned (due to its 'completeness' and wanting to remain 'what it is').

Additionally, you knowlegable on the vite/build process? Something updated and when I build it generates 'different' js than before that does not work in our environment and I don't know why.

@waldyrious
Copy link
Contributor

waldyrious commented Mar 23, 2023

is anyone really taking PRs? I kind of put it out there just for documentation for me, lol. Seems petite-vue has been abandoned (due to its 'completeness' and wanting to remain 'what it is').

I think the maintainer is just taking an extended break from this project. I've seen other projects get dormant for a while and then come back to life out of nowhere (sometimes going through multiple such cycles), so I tend to always leave my PRs open indefinitely. I know some people close issues or PRs if they feel they'll never get accepted, but after all there's no deadline in open source, and at the very least if a fork gets traction, having a list of open issues and PRs is helpful to know what proposed improvements to the original project are still applicable.

In the case of petite-vue, I get that the project status section in the README indicates that new features are unlikely to be accepted, but at the very least I'd expect the maintainer to close those PRs with an explicit decision on those grounds, which hasn't been happening; and even bugfix PRs aren't getting any attention. So IMHO it's most likely tat they're just taking a break from the project.

Additionally, you knowlegable on the vite/build process? Something updated and when I build it generates 'different' js than before that does not work in our environment and I don't know why.

I can't help you with that, sorry. I'm curious about this project and want to experiment with it, but so far I have very little experience with even Vue itself, let alone Vite.

@terryaney terryaney changed the title processDirective correctly removing attribute names with 'modifiers', bind.ts supporting onclick attribute binding bind bugs - supporting onclick attribute, retaining class attribute, walk bug - processDirective correctly removing attributes with 'modifiers', block bug - only remove template element if isConnected Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants